<!doctype html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>miya 后台登录</title>
    <link rel="stylesheet" type="text/css" href="/public/theme/css/login.css">
    <style>
        .captcha {
            background-repeat: no-repeat !important;
            background-position: 100% 50% !important;
        }
    </style>
</head>

<body>
<form class="form-horizontal" role="form" method="POST"
      action="{{ route('admin.auth.postlogin') }}">
    {{ csrf_field() }}
    <article class="htmleaf-container">
        <div class="panel-lite">
            <div class="thumbur">
                <img src="{{ get_web_logo() }}" alt="">
            </div>
            <h4>管理员</h4>
            <div class="form-group">
                <input required="required" name="username" autofocus="autofocus" class="form-control"/>
                <label class="form-label">
                    邮箱/账号
                    @if($errors->all())
                        <span class="erroeinfo">{{ $errors->first() }}</span>
                    @endif
                </label>
            </div>
            <div class="form-group">
                <input type="password" name="password" required="required" class="form-control"/>
                <label class="form-label">
                    密码
                    @if($errors->all())
                        <span class="erroeinfo">{{ $errors->first() }}</span>
                    @endif
                </label>
            </div>
            <div class="form-group">
                <input type="text" required="required" name="captcha" class="captcha form-control"/>
                <label class="form-label">
                    验证码
                    @if($errors->has('captcha'))
                        <span class="erroeinfo">{{ $errors->first('captcha') }}</span>
                    @endif
                </label>
            </div>
            <div class="form-group" style="margin-top: 0px">
                <img src="{{ captcha_src('flat') }}" alt="">
            </div>
            <button class="floating-btn"><i class="icon-arrow"></i></button>
        </div>
    </article>
    <script src="/public/theme/js/jquery.min.js"></script>
    <script>
        {{--$('.captcha').focus(function () {--}}
        {{--$(this).css('background-image', 'url({{ captcha_src('flat') }}' + Math.random() + ')');--}}
        {{--})--}}
    </script>
</form>
</body>

</html>
